package com.cat.service.common.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cat.dao.common.BizWorkflowDao;
import com.cat.entity.BizWorkflow;
import com.cat.service.common.BizWorkFlowService;

@Service
public class BizWorkFlowServiceImpl extends
		BaseServiceImpl<BizWorkflow, Integer> implements BizWorkFlowService {
	@Resource
	private BizWorkflowDao workFlowDao;
	@Resource
	public void setBaseDao(BizWorkflowDao workFlowDao) {
		super.setBaseDao(workFlowDao);
	}
	
	@Override
	public BizWorkflow getByDeploymentId(Integer deploymentId) {
		// TODO Auto-generated method stub
		List<BizWorkflow> list=workFlowDao.getByDeploymentId(deploymentId);
		if(list==null){
			return null;
		}
		return list.get(0);
	}

	@Override
  public List<BizWorkflow> getByWorkflowName(String workflowName) {
	  return workFlowDao.getByWorkflowName(workflowName);
  }
}
